﻿package mortal.game.net.command.group
{
    import Framework.MQ.*;
    import Message.Public.*;
    import com.gengine.debug.*;
    import mortal.game.events.*;
    import mortal.game.mvc.*;
    import mortal.game.net.broadCast.*;
    import mortal.mvc.core.*;

    public class GroupSettingUpdateCommand extends BroadCastCall
    {

        public function GroupSettingUpdateCommand(param1:Object)
        {
            super(param1);
            return;
        }// end function

        override public function call(param1:MessageBlock) : void
        {
            Log.debug("I have receive GroupSettingUpdateCommand");
            var _loc_2:* = param1.messageBase as SGroupSetting;
            _cache.group.groupName = _loc_2.name;
            _cache.group.memberInvite = _loc_2.memberInvite;
            _cache.group.autoEnter = _loc_2.autoEnter;
            _cache.group.passWord = _loc_2.password;
            _cache.group.combat = _loc_2.combatLimit;
            NetDispatcher.dispatchCmd(ServerCommand.GroupSettingUpdate, null);
            if (_cache.group.memberInvite && !_cache.group.isCaptain)
            {
                Dispatcher.dispatchEvent(new DataEvent(EventName.GroupGetNearPlayer));
            }
            return;
        }// end function

    }
}
